package org.dmcs.homework.statistics.api;

import Jama.Matrix;

/**
 * Calculates the averages for a given data set.
 * @author Zielony
 * @version 1.0
 */
public interface IMeanCalculator {
	/**
	 * Calculates the mean vector for all available features of a given data set for a given class of objects.
	 * @param data the whole data set.
	 * @param classIndices the indices of the objects belonging to the selected class.
	 * @return the mean vector.
	 */
	public double[] calculateMeanVector(Matrix data, int[] classIndices);
	
	/**
	 * Calculates the average vector for all the objects and all the features in a given data set. 
	 * @param data the given data set.
	 * @return the mean vector.
	 */
	public double[] calculateMeanVector(Matrix data);
	
	//KLUDGE: Zbyteczna. Usunac.
	
	/**
	 * Calculates the average vector extended to an (n x n) average matrix for calculation purposes.
	 * @param data the given data set.
	 * @param classIndices the column indices of the class objects. 
	 * @return the extended mean matrix.
	 */
	public Matrix calculateExtendedMeanMatrix(Matrix data, int[] classIndices);
	
	public double[] calculateMeanVector(Matrix data, int[] classIndices,
			int[] featureSet);
}